#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <climits>
#include <iomanip>
#include <cmath>
#include <string>
#include <vector>
#define int long long
#define x first 
#define y second 
using namespace std;
const int N = 1e5 + 10;
int a[N];
void solve()
{
    int n,p;
    cin >> n >> p;
    if(n == 1 || (n == 2 && p >= 10))
    {
        cout << p << endl;
        return;
    }
     if(n == 1 && p >= 10)
    {
        cout << 0 << endl;
        return;
    }
    if(n == 2 && p < 10)
    {
        cout << "1" << p - 1 << endl;
        return;
    }
    cout << "1";
    for(int i = 1; i <= n - 2; i++)
    {
        cout << "0";
    }
    if( p - 1 != 0)
    cout << p - 1 << endl;
    else cout << "0" << endl;
}
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr),cout.tie(nullptr);
    int t = 1;
    /*  int t;
     cin >> t; */
    while(t -- ) solve();
    return 0;
}